package AbstractFactoryMethodPattern.FactoryMethodExample.cellphone;

import AbstractFactoryMethodPattern.FactoryMethodExample.cpu.AppleCpu;
import AbstractFactoryMethodPattern.FactoryMethodExample.framework.Product;

public class iPhone extends Product {
    private final String name;
    private final AppleCpu cpu;

    public iPhone(String name, AppleCpu cpu) {
        this.name = name;
        this.cpu = cpu;
    }

    @Override
    public void use() {
        System.out.println("iPhone : " + name + " is working");
        cpu.use();
    }
}
